//WMPUIAddons.h
#include "WMPPlusPublic.h"

#pragma once

class WMPUIAddons {
	WMPPlusPublic* Owner;
public:
	inline bool getTagEditor() { return Core->getBoolProp(WMPPLUS_PROPERTY_ADDONS_TAGEDITOR); }
	inline void setTagEditor(bool value) { Core->setBoolProp(WMPPLUS_PROPERTY_ADDONS_TAGEDITOR, value); }
	inline HMENU getContextMenu() { return (HMENU)Core->getPtrProp(WMPPLUS_PROPERTY_ADDONS_CONTEXTMENU); }
	inline void setContextMenu(HMENU hMenu) { Core->setPtrProp(WMPPLUS_PROPERTY_ADDONS_CONTEXTMENU, hMenu); }
	inline LPCTSTR getTagEditorLabel() { return Core->getStrProp(WMPPLUS_PROPERTY_ADDONS_TAGEDITORLABEL); }
	inline void setTagEditorLabel(LPCTSTR str) { Core->setStrProp(WMPPLUS_PROPERTY_ADDONS_TAGEDITORLABEL, str); }
	inline BOOL getDisableGroupHeaders() { return Core->getBoolProp(WMPPLUS_PROPERTY_SETTINGS_DISABLEGROUPHEADERS); }
	inline LPCTSTR getWMPTitle() { return Core->getStrProp(WMPPLUS_PROPERTY_ADDONS_WMPTITLE); }
	inline void setWMPTitle(LPCTSTR str) { Core->setStrProp(WMPPLUS_PROPERTY_ADDONS_WMPTITLE, str); }
	inline LPCTSTR getTitle() { return Core->getStrProp(WMPPLUS_PROPERTY_ADDONS_TITLE); }
	void setTitle(LPCTSTR);

	WMPUIAddons(WMPPlusPublic* owner);
	bool ProcessKey(HWND hWnd, WORD code, DWORD info);
	void FixListViewGroupViewMessage(WPARAM &fEnable);
	void UpdateListView(BOOL groupHeaders);
	int Place(HMENU hMenu);
	bool ProcessSetTextMessage(LPCTSTR text, LRESULT &res);
	void SetWindowTitle(HWND hWnd);
	void Initialize();
	void Dispose();
};

void WINAPI WMPUIAddonsInitialize();
void WINAPI WMPUIAddonsDispose();
int WINAPI PlaceWMPUIAddons(HMENU hMenu);
void WINAPI UpdateListViewGroupHeaders(BOOL groupHeaders);
void WINAPI SetWMPlayerTitle(LPCTSTR title);
